﻿using System;
using DapperExtensions.Mapper;
using Newtonsoft.Json;

namespace ZilLion.Service.ZilLionOss.Domain.Entitys
{
    public class OssCompanyMoudleEntity
    {
        /// <summary>
        ///     纵联商城接入关键字
        /// </summary>
        [JsonProperty("zlcompanykey")]
        public string ZlcompanyKey { get; set; }

        /// <summary>
        ///     操作人id
        /// </summary>
        [JsonProperty("updateid")]
        public long UpdateId { get; set; }

        /// <summary>
        ///     更新时间
        /// </summary>
        [JsonProperty("updatetime")]
        public DateTime UpdateTime { get; set; }


        /// <summary>
        ///     模块Key
        /// </summary>
        [JsonProperty("moudlekey")]
        public string MoudleKey { get; set; }

        /// <summary>
        ///     模块名称
        /// </summary>
        [JsonProperty("moudlename")]
        public string MoudleName { get; set; }

        /// <summary>
        ///     模块gateway
        /// </summary>
        [JsonProperty("moudlegateway")]
        public string MoudleGateWay { get; set; }
    }

    public class OssCompanyMoudleMapper : ClassMapper<OssCompanyMoudleEntity>
    {
        public OssCompanyMoudleMapper()
        {
            Table("oss_company_moudle");
            Map(f => f.ZlcompanyKey).Column("zlcompanykey").Key(KeyType.Assigned);
            Map(f => f.MoudleKey).Column("moudlekey").Key(KeyType.Assigned);
            Map(f => f.MoudleName).Column("moudlename");
            Map(f => f.MoudleGateWay).Column("moudlegateway");
            Map(f => f.UpdateId).Column("updateid");
            Map(f => f.UpdateTime).Column("updatetime");
        }
    }
}